import React from 'react'
import MyNavBar from '@/components/MyNavBar'
import MyLoginForm from '../components/MyLoginForm'
import {Card,Toast} from 'antd-mobile'
import { AntOutline, RightOutline } from 'antd-mobile-icons'
import { useHistory} from 'react-router-dom'
import { useCallback } from 'react'


export default function Login() {
const his = useHistory()
  const onHeaderClick = () => {
    // 跳转到注册页
    his.push('/regist')
  }
  return (
    <div style={{
      backgroundColor:'#f6f6f6',
      height:'100%'
    }}>
      {/* 头部导航部分 */}
      <MyNavBar isShow={ false }>京东登录</MyNavBar>
      {/* 登录表单 */}
      <MyLoginForm></MyLoginForm>
      {/* 注册 */}
      <p style={{
        marginLeft:'25px',
        color:'gray'
      }}>去注册</p>
      <Card
          title={
            <div style={{ fontWeight: 'normal' }}>
              快速注册
            </div>
          }
          extra={<RightOutline />}
          onHeaderClick={onHeaderClick}
          style={{ borderRadius: '16px',margin:'6px 15px',boxSizing:'border-box' }}
        ></Card>

    </div>
  )
}
